<?php

namespace Blog\PostBundle\Entity;

/**
 * @orm:Entity
 * @orm:Table(name="post")
 */
class Post {
    /**
     *
     * @orm:ID
     * @orm:Column(type="integer")
     * @orm:GeneratedValue(strategy="AUTO")
     */
    protected $id_post;

    /**
     *
     * @orm:ManyToOne(targetEntity="Difficulte", inversedBy="posts")
     * @orm:JoinColumn(name="difficulte", referencedColumnName="id_difficulte")
     */
    protected $difficulte;

    /**
     *
     * @orm:Column(type="datetime")
     */
    protected $date;

    /**
     *
     * @orm:Column(type="text")
     */
    protected $titre_post;

    /**
     *
     * @orm:Column(type="text")
     */
    protected $contenu_post;

    /**
     *
     * @orm:Column(type="integer")
     */
    protected $vue = 0;

    /**
     * @orm:OneToMany(targetEntity="Commentaire", mappedBy="post")
     */
    protected $commentaires;

    /**
     * @orm:OneToMany(targetEntity="Ressource", mappedBy="post")
     */
    protected $ressources;

    /**
     *
     * @orm:ManyToOne(targetEntity="Blog\AccBundle\Entity\Membre", inversedBy="posts")
     * @orm:JoinColumn(name="membre", referencedColumnName="id_membre")
     */
    protected $membre;

    /**
     *
     * @orm:ManyToOne(targetEntity="Categorie", inversedBy="posts")
     * @orm:JoinColumn(name="categorie", referencedColumnName="id_categorie")
     */
    protected $categorie;

    /**
     *
     * @orm:ManyToOne(targetEntity="Labo", inversedBy="posts")
     * @orm:JoinColumn(name="labo", referencedColumnName="id_labo")
     */
    protected $labo;

    /**
     *
     * @orm:ManyToOne(targetEntity="Type", inversedBy="posts")
     * @orm:JoinColumn(name="type", referencedColumnName="id_type")
     */
    protected $type;

    function __construct(){
        $this->commentaires = new \Doctrine\Common\Collections\ArrayCollection();
        $this->ressources = new \Doctrine\Common\Collections\ArrayCollection();

    }

    public function getId_post() {
        return $this->id_post;
    }

    public function getDifficulte() {
        return $this->difficulte;
    }

    public function setDifficulte($difficulte) {
        $this->difficulte = $difficulte;
    }

    public function getDate() {
        return $this->date;
    }

    public function setDate($date) {
        $this->date = $date;
    }

    public function getTitre_post() {
        return $this->titre_post;
    }

    public function setTitre_post($titre_post) {
        $this->titre_post = $titre_post;
    }

    public function getContenu_post() {
        return $this->contenu_post;
    }

    public function setContenu_post($contenu_post) {
        $this->contenu_post = $contenu_post;
    }

    public function getVue() {
        return $this->vue;
    }

    public function setVue($vue) {
        $this->vue = $vue;
    }

    public function getCommentaires() {
        return $this->commentaires;
    }

    public function setCommentaires($commentaires) {
        $this->commentaires = $commentaires;
    }

    public function getRessources() {
        return $this->ressources;
    }

    public function setRessources($ressources) {
        $this->ressources = $ressources;
    }

    public function getMembre() {
        return $this->membre;
    }

    public function setMembre($membre) {
        $this->membre = $membre;
    }

    public function getCategorie() {
        return $this->categorie;
    }

    public function setCategorie($categorie) {
        $this->categorie = $categorie;
    }

    public function getLabo() {
        return $this->labo;
    }

    public function setLabo($labo) {
        $this->labo = $labo;
    }

    public function getType() {
        return $this->type;
    }

    public function setType($type) {
        $this->type = $type;
    }


}

?>
